cmake_minimum_required(VERSION 3.10.2)
project("flutterdemo")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -L${CMAKE_SOURCE_DIR}/libs/${ANDROID_ABI}")
include_directories("${CMAKE_SOURCE_DIR}")
link_directories(${PROJECT_SOURCE_DIR}/../../../libs/armeabi-v7a)
aux_source_directory(${CMAKE_SOURCE_DIR} SRC_LIST)
add_library(native-lib
        SHARED
        "${SRC_LIST}")
find_library(opensl OpenSLES)
find_library(
        log-lib
        log)
target_include_directories(native-lib PUBLIC
        "${CMAKE_SOURCE_DIR}"
        "${CMAKE_SOURCE_DIR}/include"
        "${CMAKE_SOURCE_DIR}/include/android"
        "${CMAKE_SOURCE_DIR}/include/atlastext"
        "${CMAKE_SOURCE_DIR}/include/c"
        "${CMAKE_SOURCE_DIR}/include/codec"
        "${CMAKE_SOURCE_DIR}/include/config"
        "${CMAKE_SOURCE_DIR}/include/core"
        "${CMAKE_SOURCE_DIR}/include/effects"
        "${CMAKE_SOURCE_DIR}/include/pathops"
        "${CMAKE_SOURCE_DIR}/include/ports"
        "${CMAKE_SOURCE_DIR}/include/encode"
        "${CMAKE_SOURCE_DIR}/include/gpu"
        "${CMAKE_SOURCE_DIR}/include/private"
        "${CMAKE_SOURCE_DIR}/include/svg"
        "${CMAKE_SOURCE_DIR}/include/ports"
        "${CMAKE_SOURCE_DIR}/include/third_party"
        "${CMAKE_SOURCE_DIR}/include/utils")
target_link_libraries(native-lib
        skia
        -ljnigraphics
        -landroid
        ${opensl}
        ${log-lib})